﻿#pragma once
#include <QStyledItemDelegate>
#include <QScopedPointer>

class TextViewItemDelegate : public QStyledItemDelegate {
    Q_OBJECT
    struct TextViewItemDelegateData;
    QScopedPointer<TextViewItemDelegateData> d;

public:
    ~TextViewItemDelegate();
    explicit TextViewItemDelegate(QObject *parent = nullptr);
    void setHighlightTextColor(const QColor &color, int dataRole);
    QColor highlightTextColor() const;

public:
    void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
};
